Repository navigation
fix: preserve feature numbering during reinitialization - #5101
Merged
mnriem merged 1 commit intoOct 26, 2026
Merged
Conversation
Assisted-by: Codex (model: GPT-6, autonomous)
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused fix meets the stated requirements and has targeted before-and-after regression evidence.
No open issues 🎉
What changed in this PR
Preserves feature-numbering configuration when Specify CLI reinitializes a project, addressing #5098 while retaining sequential numbering for fresh initialization.
Changes:
- Reuse the existing
feature_numberingvalue, defaulting tosequentialonly when absent. - Add offline regression coverage for timestamp, sequential, and missing settings, including custom-option preservation and
hereupdates.
Validation included a dependency-free option-selection check. CLI tests were not rerun; before-and-after regression results were provided in the PR.
| File | Description |
|---|---|
tests/specify_cli/test_command_init.py |
Adds parametrized reinitialization regression coverage. |
src/specify_cli/command_init.py |
Preserves the saved feature-numbering setting. |
Review effort: Max
Collaborator
|
Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #5098. Re-running
specify init --here --forcecurrently replaces a project'sfeature_numbering: "timestamp"with"sequential". Preserve the existing setting, defaulting to sequential only when it is absent. Fresh initialization still uses sequential numbering.The regression test exercises real offline initialization and re-initialization for timestamp, sequential, and missing settings. It also verifies that a custom option survives while the current
hereoption is updated.Testing
.venv/Scripts/specify --help.uv sync --extra testand ran the affected tests using this checkout's virtualenv.On Windows with Python 3.14.6:
.venv/Scripts/python -m pytest tests/specify_cli/test_command_init.py tests/test_branch_numbering.py -q: 20 passed, 3 shell-dependent tests skipped..venv/Scripts/python -m pytest tests/integrations/test_cli.py -k 'not symlink' -q: 70 passed, 1 skipped, 5 deselected, 2 failed. Both failures occur in fixture setup atos.symlinkwith Windows error 1314 (missing symlink privilege), before exercising the changed code. The unrestricted integration run encounters the same privilege limitation. The full repository suite was not run..specify/feature.json.git diff --checkpasses. Ruff reports the same eight existing findings incommand_init.pyon the unchanged base and this branch; the test file has no findings.AI Disclosure
AI disclosure: OpenAI Codex (GPT-6), operating autonomously on behalf of Shubham-Padkonde, investigated the issue, generated the code and tests, ran validation and the sample workflow, and drafted this PR. A more specific model variant/reasoning setting is not exposed to the agent. This disclosure does not claim personal line-by-line human review.